package top.zhangjianyong.blog.utils;

import java.time.LocalDate;
import java.time.format.DateTimeFormatter;

/**
 * 日期工具类
 *
 * @author zhangjianyong
 * @since 2024/7/26 下午6:18
 */
public class LocalDateUtil {
  private static final DateTimeFormatter DTF_YYYYMMDD = DateTimeFormatter.ofPattern("yyyyMMdd");

  public static String dateToStr() {
    return LocalDate.now().format(DTF_YYYYMMDD);
  }

  public static void main(String[] args) {
    System.out.println(dateToStr());
  }
}
